import { ConfigProvider } from "antd";
import zhCN from "antd/locale/zh_CN";
import { Suspense } from "react";
import { useRoutes } from "react-router-dom";
import { router } from "./router";

import "./App.css";

function App() {
  return (
    <div className="App">
      <Suspense fallback={<div>loding</div>}>
        <ConfigProvider
          locale={zhCN}
          theme={{
            token: {
              colorPrimary: "rgb(39,102,146)",
            },
            components: {
              Menu: {
                itemColor: "rgb(39,102,146)",
                activeBarHeight: 3,
              },
            },
          }}
        >
          {useRoutes(router)}
        </ConfigProvider>
      </Suspense>
    </div>
  );
}
export default App;
